<!--继承公共模板-->
<extend name="Layout:jqweui"/>
<!--网页标题-->
<block name="title">面试评价</block>

<!--内部样式-->
<block name="import_head">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/weui.min.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/weui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/jquery-weui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/enter.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/appraise.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/hr/css/scale.css"/>
    <!--<script src="https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/2.5.1/vconsole.min.js"></script>-->
</block>

<!--内部样式-->
<block name="style">
    <style>

    </style>
</block>

<!--页面内容-->
<block name="page">
    <div class="mainBox">
        <main class="main">
            <!--悬浮窗-->
            <section>
                <div class="mainSuspend">
                    <div class="suspendImg">
                        <img src="__PUBLIC__/common/hr/img/evaluate.svg" alt="">
                    </div>
                    <div class="suspendTxt">评价</div>
                </div>
            </section>
            <section class="mainComBox">
                <div class="mainCom">
                    <div class="mainName text"></div>
                    <div class="mainZw text"></div>
                    <div class="mainJd text"></div>
                </div>
                <div class="mainBtn">
                    <div class="BtnNoPass Btn" id="BtnNoPass">不通过</div>
                    <!--<div class="BtnIndex Btn" id="BtnIndex">待定</div>-->
                    <div class="BtnPass Btn" id="BtnPass">通过</div>
                </div>
            </section>
            <section class="mainBtnBox">
                <div class="weui-tab">
                    <div class="weui-navbars">
                        <a class="weui-navbar__item message" href="#tab1">简历信息</a>
                        <a class="weui-navbar__item history" href="#tab2">面试记录</a>
                    </div>
                    <div class="weui-tab__bd">
                        <div id="tab1" class="weui-tab__bd-item">
                            <section style="display: block;">
                                <div class="weui_cell tab1">
                                    <div class="weui_cell_hd">
                                        <label for="" class="weui_label">应聘日期</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary">
                                        <input class="weui_input my-input yTime" name="yTime" id="my-input" type="text"
                                               value="">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">渠道类型</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary select">
                                        <input class="weui_input choice typeTrench" name="channel" id="typeTrench"
                                               type="text" placeholder="-- 请选择 --">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">应聘渠道</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary select">
                                        <input class="weui_input choice channel" name="channel" id="trench" type="text"
                                               placeholder="-- 请选择 --">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">性别</label>
                                    </div>
                                    <div class=" weui_cells_checkbox">
                                        <label class="weui_cell weui_check_label label" for="x11">
                                            <div class="weui_cell_hd hd">
                                                <input type="radio" class="weui_check" name="radio1" value="女" id="x11"
                                                       checked="checked">
                                                <i class="weui_icon_checked"></i>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary bd">
                                                <p>女</p>
                                            </div>
                                        </label>
                                        <label class="weui_cell weui_check_label label" for="x12">
                                            <div class="weui_cell_hd hd">
                                                <input type="radio" name="radio1" class="weui_check" value="男" id="x12">
                                                <i class="weui_icon_checked"></i>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary bd">
                                                <p>男</p>
                                            </div>
                                        </label>
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">手机</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary">
                                        <input class="weui_input verify outfocus phone" name="phone" id="phone"
                                               type="number" placeholder="请填写个人常用号码">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">现居住地址</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary">
                                        <input class="weui_input outfocus dz" name="address" type="text"
                                               placeholder="请填写现在详细住址">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">身份证号码</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary">
                                        <input class="weui_input verify outfocus ssz" name="pattern" id="pattern"
                                               type="number" placeholder="请填写个人身份证号">
                                    </div>
                                </div>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">婚姻状况</label>
                                    </div>
                                    <div class="weui_cell_bd weui_cell_primary select">
                                        <input class="weui_input choice hy" name="marriage" id="marriage" type="text"
                                               placeholder="-- 请选择 --">
                                    </div>
                                </div>
                            </section>
                            <!--如果有附件显示-->
                            <section>
                                <div class="weui_cell">
                                    <div class="weui_cell_hd">
                                        <label class="weui_label">简历附件</label>
                                    </div>
                                </div>
                                <!--如果是文档显示-->
                                <div class="img-cont">
                                    <div class="li txt_diy_bg wendang1"></div>
                                </div>
                                <div class="img-cont">
                                    <div class="li txt_diy_bg wendang2"></div>
                                </div>
                                <!--如果是图片显示-->
                                <div class="list">
                                    <div class="img-cont">
                                        <div id='img"+ id + "' class='li'>
                                            <img src='https://farm4.staticflickr.com/3894/15008518202_b016d7d289_m.jpg'
                                                 class='img'/>
                                        </div>
                                        <!--<img src="https://farm4.staticflickr.com/3894/15008518202_b016d7d289_m.jpg" />-->
                                        <!--<img src="https://farm6.staticflickr.com/5591/15008867125_68a8ed88cc_m.jpg" />-->
                                    </div>
                                </div>
                                <!--图片放大-->
                                <section class="imgzoom_pack">
                                    <div class="imgzoom_x">X</div>
                                    <div class="imgzoom_img"><img src=""/></div>
                                </section>
                            </section>
                            <!--如果没有附件显示-->
                            <section style="display: none;">
                                <section>
                                    <div class="weui_cells_form">
                                        <div class="weui_cell">
                                            <div class="weui_cell_hd">
                                                <label class="weui_label">邮箱</label>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary">
                                                <input class="weui_input verify outfocus cEmail" name="cEmail"
                                                       id="email"
                                                       type="email" placeholder="请填写个人常用邮箱">
                                            </div>
                                        </div>
                                        <div class="weui_cell">
                                            <div class="weui_cell_hd">
                                                <label class="weui_label">籍贯</label>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary select">
                                                <input class="weui_input choice cJiguan" name="cJiguan" id="native"
                                                       type="text" placeholder="-- 请选择 --">
                                            </div>
                                        </div>
                                        <div class="weui_cell">
                                            <div class="weui_cell_hd">
                                                <label class="weui_label">民族</label>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary">
                                                <input class="weui_input choice cMinzu" name="cMinzu" id="nation"
                                                       type="text" placeholder="-- 请选择 --">
                                            </div>
                                        </div>
                                        <div class="weui_cell">
                                            <div class="weui_cell_hd">
                                                <label for="" class="weui_label">农历生日</label>
                                            </div>
                                            <div class="weui_cell_bd weui_cell_primary">
                                                <input class="weui_input my-input cShengri" name="cShengri"
                                                       id="my-input1"
                                                       type="text" value="">
                                            </div>
                                        </div>
                                    </div>
                                </section>
                                <!--教育经历-->
                                <section>
                                    <div class="weui_panel_hd experience">
                                        <div class="experTitle">教育经历(从高到低)</div>
                                        <!--<div class="experImgBox education">-->
                                        <!--<div class="experText">新增</div>-->
                                        <!--<div class="experImg">-->
                                        <!--<img src="./img/add.svg" alt="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                    </div>
                                    <section class="section experList studyList">
                                        <!--<div class="experListTop deteleBox">-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd"><label for="" class="weui_label">开始时间</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input my-input" name="jytime" id="kaishi" type="text"-->
                                        <!--value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd"><label for="" class="weui_label">结束时间</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input my-input" name="jytime" id="end" type="text"-->
                                        <!--value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">毕业院校全称</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input" name="jytime" type="text"-->
                                        <!--placeholder="请填写毕业院校" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">专业</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input" name="jytime" type="text" placeholder="请填写专业" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">学历及学位</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input educa" name="jytime" id="educa" type="text"-->
                                        <!--placeholder="&#45;&#45; 请选择 &#45;&#45;" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--</div>-->
                                    </section>
                                </section>
                                <!--工作经历-->
                                <section>
                                    <div class="weui_panel_hd experience">
                                        <div class="experTitle">工作经历</div>
                                        <div class="experImgBox work">
                                            <div class="experText">新增</div>
                                            <div class="experImg">
                                                <img src="./img/add.svg" alt="">
                                            </div>
                                        </div>
                                    </div>
                                    <section class="section experList workList">
                                        <!--<div class="experListTop deteleBox1">-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd"><label for="" class="weui_label">开始时间</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input my-input" name="jltime" id="my-input3"-->
                                        <!--type="text" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd"><label for="" class="weui_label">结束时间</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input my-input" name="jltime" id="my-input4"-->
                                        <!--type="text" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">工作单位全称</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input outfocus" name="jltime" type="text"-->
                                        <!--placeholder="请填写工作单位" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">部门及职位</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input outfocus" name="jltime" type="text"-->
                                        <!--placeholder="请填写部门及职位" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">离职原因</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input outfocus" name="jltime" type="text"-->
                                        <!--placeholder="请填写离职原因" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">证明人</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input outfocus" name="jltime" type="text"-->
                                        <!--placeholder="请填写姓名" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell">-->
                                        <!--<div class="weui_cell_hd">-->
                                        <!--<label class="weui_label">电话</label>-->
                                        <!--</div>-->
                                        <!--<div class="weui_cell_bd weui_cell_primary">-->
                                        <!--<input class="weui_input outfocus verify" id="zmrPhone" name="jltime"-->
                                        <!--type="number" placeholder="请填写电话号码" value="">-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--</div>-->
                                    </section>
                                </section>
                            </section>
                        </div>
                        <!--历史记录-->
                        <div id="tab2" class="weui-tab__bd-item">
                            <!--无记录显示-->
                            <div class="without">暂无记录</div>
                            <!--有记录显示-->
                            <!--<div class="have" >记录正在加载...</div>-->
                            <div class="track-rcol" id="track-rcol">
                                <div class="track-list">
                                    <ul class="track-Ul">
                                        <!--<li class="node-icon">-->
                                        <!--<i class="node-icon"></i>-->
                                        <!--<div class="history">-->
                                        <!--<p>面试时间：2018-09-29</p>-->
                                        <!--<div class="line"></div>-->
                                        <!--<div class="history-event">-->
                                        <!--<p>所在阶段：一面</p>-->
                                        <!--<p>面试评价：相当好非常好很好好好</p>-->
                                        <!--</div>-->
                                        <!--</div>-->
                                        <!--</li>-->
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <section>
                <div class="weui_popupBg">
                    <div class="popupBg"></div>
                    <div class="tooShort">
                        <img src="__PUBLIC__/common/hr/img/2.png" alt="">
                    </div>
                    <div class="letGo">
                        <img src="__PUBLIC__/common/hr/img/1.png" alt="">
                    </div>
                    <div class="popupCom">
                        <div class="popupTitle">面试评价</div>
                        <div class="popupTar">
                    <textarea id="detail2" name="msg" class="textarea editDetail"
                              placeholder="请详细说明候选人的优势。不足、及任何值得注意的方面"></textarea>
                            <div class="hintBox">
                                <div class="hintTxt">
                                    <div class="hintTranslate">按住话筒说话，即可翻译成文字...</div>
                                    <div class="hintImg">
                                        <img src="__PUBLIC__/common/hr/img/close.svg" alt="">
                                    </div>
                                </div>
                                <div class="arrow-right">
                                    <!--向右的三角-->
                                </div>
                            </div>
                            <div class="microphoneBox">
                                <div class="microphone" id="talk_btn"></div>
                            </div>
                        </div>
                        <div class="popupBtnBox">
                            <div class="popupBtn">
                                <div>保存</div>
                            </div>
                        </div>
                        <div class="popupAddImg">
                            <img src="__PUBLIC__/common/hr/img/close.svg" alt="">
                        </div>
                    </div>
                </div>
            </section>
        </main>
    </div>
</block>

<!--尾部引入-->
<block name="import_foot">
    <script src="__PUBLIC__/common/hr/js/jquery-3.3.1.min.js"></script>
    <script src="__PUBLIC__/common/hr/js/jquery-weui.min.js"></script>
    <script src="__PUBLIC__/common/hr/js/swiper.min.js"></script>
    <script src="__PUBLIC__/common/hr/js/city-picker.min.js"></script>
    <script src="__PUBLIC__/common/hr/js/scale.js"></script>
    <script src="__PUBLIC__/common/hr/js/appraise.js"></script>
</block>

<!--js代码-->
<block name="script">
    <script>
        document.addEventListener("DOMContentLoaded", function (event) {
            ImagesZoom.init({
                "elem": ".list"
            });
        }, false);

        $('.hintImg').click(function () {
            $('.hintBox').fadeOut(600)
        })

        wx.ready(function () {
        });
        var START = null;   //开始时间
        var END = null; //最后时间
        var timeout = undefined;    //定时器
        var state = 0;  //状态
        function showRecording() {
            clearTimeout(timeout);
            state = 0;
            timeout = setTimeout(function () {
                state = 1;
            }, 1000);
        }

        function stopRecording() {
            clearTimeout(timeout);
            state = 0;
        }

        $("#talk_btn").on("touchstart", function (event) {
            $('.hintBox').fadeOut(600)
            event.preventDefault();
            START = new Date().getTime();
            $('.microphone').addClass('microphoneBg')
            wx.startRecord({
                success: function () {
                    recordTimer = setTimeout(function () {
                        var longTime = new Date().getTime();
                        if (longTime - START > 100) {
                            $('.letGo').fadeIn(600)
                            showRecording();
                        }
                        wx.startRecord({
                            success: function () {
                                localStorage.rainAllowRecord = 'true';
                            }
                        });
                    }, 300);
                },
                cancel: function () {
                    stopRecording();
                    alert('用户拒绝授权录音');
                }
            });
        });
        //取消触摸
        $('#talk_btn').on('touchcancel', function (event) {
            stopRecording();
            wx.stopRecord({
                success: function (res) {
                    clearTimeout(recordTimer);
                },
                fail: function (res) {
                }
            });
        })
        $("#talk_btn").on("touchend", function (event) {
            $('.hintBox').fadeOut(600)
            $('.microphone').removeClass('microphoneBg')
            stopRecording();
            event.preventDefault();
            END = new Date().getTime();
            wx.stopRecord({
                success: function (res) {
                    if ((END - START) < 300) {
                        END = 0;
                        START = 0;
                        //小于300ms，不录音
                        clearTimeout(recordTimer);
                        $('.letGo').fadeIn(600)
                        return;
                    }
                    $('.microphone').removeClass('microphoneBg')
                    translateVoice(res.localId);
                },
                fail: function (res) {
                    alert(JSON.stringify(res));
                }
            });
            setTimeout(function () {
                // $('.tooShort').fadeOut(600)
                $('.letGo').fadeOut(600)
            }, 500)
        });

        function translateVoice(localId) {
            wx.translateVoice({
                localId: localId, // 需要识别的音频的本地Id，由录音相关接口获得
                isShowProgressTips: 1, // 默认为1，显示进度提示
                success: function (res) {
                    // console.log(res)
                    let val = $('textarea[name=msg]').val()
                    if (!res.translateResult) {
                        $('textarea[name=msg]').val(val + '')
                    } else {
                        $('textarea[name=msg]').val(val + res.translateResult); // 语音识别的结果
                    }
                }
            });
        }
    </script>
</block>